switchroot: Don't log if running as pid1, minor code style cleanups
authorColin Walters <walters@verbum.org>
Tue, 3 Apr 2018 20:22:31 +0000 (16:22 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 13 Apr 2018 20:01:51 +0000 (20:01 +0000)
commitfea9277020e040a0be6d0c626262a2a2ff36a318
tree42a5ddcc1b27efadb111e0ebd1b76f8d886c557c
parenta2dc73198203ca61be997ba67d8edecce3520bba
switchroot: Don't log if running as pid1, minor code style cleanups

If we're running as pid1, avoid printing anything in the normal
success paths as we don't want to affect the physical console by
default; the device may be using a splash screen, etc.

Also cleanup the code a bit to use a single variable
`running_as_pid1`, declare-and-initialize, use the
`bool` type, etc.

Closes: #1531
Approved by: jlebon
src/switchroot/ostree-prepare-root.c